1. Field of the Invention
The present invention relates to data compression and decompression methods for two-dimensional image data.
2. Description of the Related Art
An irreversible data compression method and a reversible data compression method are known as the conventional image compression method. Examples of the irreversible data compression method include JPEG (Joint Photographic Except Group) or MPEG (Moving Picture Except Group) using discrete cosine transformation (DCT). In the case where image data using color code (or color pallet call code) is to be compressed, such an irreversible data compression method cannot be used since the missing of information may be generated. Typical examples of the reversible data compression method include a method in which data compression is performed using the run length of information (run-length compression method) and a method in which data compression is performed in such a manner that frequently occurring information is registered in a dictionary (dictionary compression method). The latter method or dictionary compression method is disclosed by Ziv and Lempel, "Compression of Individual Sequences via Variable Rate Coding", IEEE Transactions on Information Theory, IT-24, pp. 530-536.
The above compression methods involve problems which will be mentioned in the following.
Though the run-length compression method is effective for image data which abounds with the same continuous information, this method is ineffective for image data which is not so, that is, there may be the case where the effect of compression does not appear at all.
Though the dictionary compression method is effective for image data which has a high hit ratio for the dictionary, this method is ineffective for image data which is not so. Also, since the hit ratio depends on a storage capacity for storing the dictionary, a storage location having a large capacity is needed if it is desired to obtain a high hit ratio. Further, since the large-capacity dictionary is involved, the number of times of reference to the dictionary is increased, thereby lowering the compression speed.